![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@tiptap/extension-history
Advanced tools
@tiptap/extension-history is an extension for the Tiptap editor that provides undo and redo functionality. It allows users to revert changes or reapply them, enhancing the editing experience by providing a way to navigate through the history of changes made to the document.
Undo
This feature allows users to undo the last action performed in the editor. The configuration options allow setting the maximum number of history events and the delay for creating a new group of actions.
import { Editor } from '@tiptap/core';
import History from '@tiptap/extension-history';
const editor = new Editor({
extensions: [
History.configure({
depth: 100, // Maximum number of history events
newGroupDelay: 500 // Time in ms to create a new group
})
]
});
// To undo the last action
editor.commands.undo();
Redo
This feature allows users to redo the last undone action in the editor. Similar to the undo feature, it can be configured with options for the maximum number of history events and the delay for creating a new group of actions.
import { Editor } from '@tiptap/core';
import History from '@tiptap/extension-history';
const editor = new Editor({
extensions: [
History.configure({
depth: 100, // Maximum number of history events
newGroupDelay: 500 // Time in ms to create a new group
})
]
});
// To redo the last undone action
editor.commands.redo();
prosemirror-history is a package for ProseMirror that provides undo and redo functionality. It is similar to @tiptap/extension-history as Tiptap is built on top of ProseMirror. The main difference is that @tiptap/extension-history is specifically designed to integrate seamlessly with the Tiptap editor, while prosemirror-history is a more general solution for any ProseMirror-based editor.
slate-history is an extension for the Slate editor that provides undo and redo functionality. It is similar to @tiptap/extension-history in that it allows users to navigate through the history of changes made to the document. However, it is designed specifically for the Slate editor, which has a different architecture and API compared to Tiptap.
Tiptap is a headless wrapper around ProseMirror – a toolkit for building rich text WYSIWYG editors, which is already in use at many well-known companies such as New York Times, The Guardian or Atlassian.
Documentation can be found on the Tiptap website.
Tiptap is open sourced software licensed under the MIT license.
FAQs
history extension for tiptap
The npm package @tiptap/extension-history receives a total of 766,955 weekly downloads. As such, @tiptap/extension-history popularity was classified as popular.
We found that @tiptap/extension-history demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 6 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.